Hybris UX Api
TMF667 - Post document
This operation allows you to create a QR Code.
URL
http://[localhost]:[port]/ecom-ux/v1/{businessId}/document
URL PARAMS
name | type | description | required |
---|---|---|---|
businessId | String | 2 letter ISO 3166 country code (PA) identifying the business unit. | Y |
Headers
name | type | description | required |
---|---|---|---|
client-id | String | The client-id identifying the channel. | Y |
client-secret | String | Password associated with the client-id. | Y |
X-Correlation-ID | String | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | N |
Data Model - Request
field name | type | description | required (mandatory-M, optional-O |
---|---|---|---|
name | String | name for the QR code image to saved in emarsys | M |
documentType | String | Type of the documentType | O |
characteristic[] | Array | M | |
characteristic[].valueType | String | valuetype for the characteristic field | M |
characteristic[].value | String | value for the characteristic field | M |
characteristic[].name | String | Name for the characteristic field | M |
Data Model - Response
field name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
id | string | unique identifier | N |
name | string | A string used to give a name to the document. | N |
documentType | string | Name of the document type | N |
status | string | A document status type (DocumentStatusType). The life cycle state of the document. | N |
characteristic | array | A list of characteristics (Characteristic [*]). Describes a given characteristic of an object or entity through a name/value pair. | N |
characteristic.name | string | Name of the characteristic | N |
characteristic.valueType | string | Data type of the value of the characteristic. | N |
characteristic.value | any | The value of the characteristic. | N |
attachment | array | A list of attachment ref or values (AttachmentRefOrValue [*]). An attachment by value or by reference. An attachment complements the description of an element, for example a picture. | N |
attachment.id | string | Unique identifier for this particular attachment. | N |
attachment.attachmentType | string | Attachment type such as picture. | N |
attachment.mimeType | string | Attachment mime type such as extension file for picture. | N |
attachment.name | string | The name of the attachment. | N |
attachment.size | object | The size of the attachment. | N |
attachment.size.amount | float | Numeric value in a given unit. | N |
attachment.size.unit | string | Units | N |
attachment.url | string | Remote reference to the content if web-addressable. | N |
characteristics - sub-resource
field name | valueType | description | required(mandatory-Y, optional-N, Not applicable- N/A) | examples |
---|---|---|---|---|
characteristic[].name=="folderId" | integer | Customer address id | Y for generating QRcode URL N/A for generating base64 format QRcode | { "name": "folderId", "valueType": "integer", "value": TBD } |
characteristic[].name=="height" | integer | Customer contact id | Y for generating QRcode URL N/A for generating base64 format QRcode | { "name": "height", "valueType": "integer", "value": 300 } |
characteristic[].name=="width" | integer | business unit | Y for generating QRcode URL N/A for generating base64 format QRcode | { "name": "width", "valueType": "integer", "value": 300 } |
characteristic[].name=="activationCode" | String | Customer location id | Y for both | { "name": "activationCode", "valueType": "integer", "value": "LPA:1$sm-v4-099-a-gtm.pr.go-esim.com$0D7DBE1E622DD42E26A11DD09A04FE50" } |
Key considerations
-API will support two ways to generate QRcode image:
1.generating the base64 content for the QRcode image.
- name will be static value. we can pass "eSIM".
- In the characteristic array, only pass the object with characteristic.name = "activationCode" as defined in the sub-resource data model. This value will be used to generate the QR code.
- please refer to below sample examples from specification url:
resquest - "PA_QRcode-Base64_request"in API specification
response - "PA_QRcode-Base64_response" in API specification
2.generating the URL of the QRcode via storing emarsys.
- The name field should specify the name of the QR code image to be stored in Emarsys. It must include a valid image file extension (e.g., "PA_esim_123123.jpg").
- In the characteristic array, include the following objects as defined in the sub-resource data model:
- characteristic.name = "activationCode" – to generate the QR code content
- characteristic.name = "height" – to define the image height
- characteristic.name = "width" – to define the image width
- characteristic.name = "folderId" – to indicate the folder name where the image should be stored in Emarsys
-please refer to below sample examples from specification url:
resquest - "PA_QRcode-URL_request"in API specification
response - "PA_QRcode-URL_response" in API specification
Note: For sample examples please refer to this URL - Post Document